package org.example.controller;


import io.swagger.v3.oas.annotations.Operation;
import lombok.extern.slf4j.Slf4j;
import org.example.pojo.Users;
import org.example.service.IUsersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author zhx
 * @since 2025-01-17
 */
@Slf4j
@RestController
@RequestMapping("/users")
public class UsersController {


    @Autowired
    private IUsersService usersService;
    @GetMapping("/getAllUsers")
    public List<Users> getAllUsers() {
       return usersService.list();
    }

//    @Operation(summary = "用户详情")
//    @GetMapping("/getUserById/{userId}")
//    public Users getUserById(@PathVariable Integer userId) {
//        return usersService.getById(userId);
//    }
}
